Many modern database programs integrate a relational database engine and a graphical user interface (GUI). The GUI can allow a user to create, modify, and view tables in a database by clicking, dragging, and linking graphical objects on a display device. One or more query statements can be created by a backend software component, such as a query builder. The query statements can be passed to the database engine, and executed in the database engine. Result sets of the query statements can be passed back to the GUI. The result sets can be displayed graphically after being formatted by a software component, such as a result processor. The database program can thus provide tools to a database user to enable a database user to utilize complex database features without detailed knowledge of a database engine.
In addition to database programs with integrated GUI, many modern database application development tools contain a GUI component. A database application, such as an enterprise Web publishing application, can be developed by information systems (IS) developers using a database application development tool with GUI. A database application development tool with GUI can allow an IS developer to create sophisticated applications without directly interacting with a database using standard database query languages such as SQL. The GUI component can be responsible for making a database application development tool easy-to-use, reliable, and capable of providing high-quality database publishing and reporting solutions.
Often, a database program user or an IS developer needs to use a GUI that contains dynamically generated controls. A dynamically generated graphical control is a control that does not have a fixed size, shape, or color. Instead, the size, shape, or color of a control can represent some information in a database without an explicit user request. The information can be a result ratio, i.e., a percentage of rows returned from query as against the total number of rows in a database table. Traditionally, showing a result ratio in a chart in a user interface requires complicated user manipulation. A user is required to construct multiple queries and create the chart by writing specialized procedures. Even so, the chart can only be a result, but not a control in a traditional database program or a database application development tool. Therefore, traditionally, it is difficult for a user to see a context of a set of records retrieved from a database. A solution is needed to allow a result ratio chart to be generated automatically, in order to provide the user with a context hinting that the set of records returned is a portion of the total set of records.